UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VbKFW0Hl5qTO6uJxJ/1AcpOUEWUhainxl9SQFQ8ugEg='
WHERE
key_id = '5c3acf7e3f1c88a97dbbe7635869b7ae17ad93f8a83f1ce1c0ae86b063f11983'
AND (
token = 'VbKFW0Hl5qTO6uJxJ/1AcpOUEWUhainxl9SQFQ8ugEg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)