UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ooIzGXYXhYzOyAkmlW1gMqFRPjWlpQ43zozZryVtLGo='
WHERE
key_id = '039b21ee19b6c7ecb23f9d39023d45de53f492b0b9a0969be4af637275d1f8ff'
AND (
token = 'ooIzGXYXhYzOyAkmlW1gMqFRPjWlpQ43zozZryVtLGo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)