UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hbyetweZCsL+5j0HHF9TzhEoP6fo1cUiy1yL6rKdx8g='
WHERE
key_id = '3bc14988dc68f6f33c91530d7959035e111c62a6275b94a82e9aa4b7c30400bf'
AND (
token = 'hbyetweZCsL+5j0HHF9TzhEoP6fo1cUiy1yL6rKdx8g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)