UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NDjQ9C7ubSxG6TumlpR9jT0hWH+MbXmZjUBwBI61kWA='
WHERE
key_id = '34cccd9371437c3fbd3b62a37fd21db227cc4ba904cb865409c6ed5f6774dce4'
AND (
token = 'NDjQ9C7ubSxG6TumlpR9jT0hWH+MbXmZjUBwBI61kWA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)