UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GUOvhszB7LR9BgDPcogWyqygIzYzKard14MI1TH7/a8='
WHERE
key_id = '1348f18ee33f5d19c9dd3300dffad1d6a82d35a013ba37bac5e24740e79af2fe'
AND (
token = 'GUOvhszB7LR9BgDPcogWyqygIzYzKard14MI1TH7/a8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)