UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e84OU5HTMqZ4zLArsImnhOb09HS/QyB4DshULaujI74='
WHERE
key_id = '75b2d080483cbdd8ac0fa6ec26172965ab8b2a4f72680c9664cc84367aafb22a'
AND (
token = 'e84OU5HTMqZ4zLArsImnhOb09HS/QyB4DshULaujI74='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)