UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LkGNV1yzasvROFUeaTkpCiuE68igp/ZG+roxjJKj0/8='
WHERE
key_id = '904c480c617d5619f6a37b3f88896f3021fabb1e03c793eb6ae59bb19cf19ca8'
AND (
token = 'LkGNV1yzasvROFUeaTkpCiuE68igp/ZG+roxjJKj0/8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)