UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vVkJKmYduIAKxIs8dBG8/GTWyGC8QxfyglZZBjJh96g='
WHERE
key_id = '35af5b59838dc4281caeb74e60668dc14a5e1efe7339847e87e9e8b960fa7c92'
AND (
token = 'vVkJKmYduIAKxIs8dBG8/GTWyGC8QxfyglZZBjJh96g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)