UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zlRYoyU+1XHySHla2FSaAPNyN1aoH39yyL9wcYJ4whA='
WHERE
key_id = '30cfe9ba5677523ccd448344aaaa0c9befdc564c7d70791c3663d066f31b38ca'
AND (
token = 'zlRYoyU+1XHySHla2FSaAPNyN1aoH39yyL9wcYJ4whA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)