UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JrrMCPriHlgFT/AiweEG2sQ0Xx2rSZiq+GjZjJcoNf8='
WHERE
key_id = '41c331d5501b228ab88aed20e0b5f288f5dd71c2bce4018206ad5c073011cd20'
AND (
token = 'JrrMCPriHlgFT/AiweEG2sQ0Xx2rSZiq+GjZjJcoNf8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)