UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4PKQhI6zP7hw0a8n2d8/R+rcmz94u9+8ev2PjiZOXWE='
WHERE
key_id = '62cdd760220c358f18072a8674650ac4703f10bbdf08772abf8e69a2fe2b3941'
AND (
token = '4PKQhI6zP7hw0a8n2d8/R+rcmz94u9+8ev2PjiZOXWE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)