UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5qd/BkpAmidLrLUwiT+50RsvmG96Gq8v+vSSG/EbZQY='
WHERE
key_id = 'db6303df4106dc5c17fd4df294035d65aada81a26c466bb3d7a6ae837e6f29b9'
AND (
token = '5qd/BkpAmidLrLUwiT+50RsvmG96Gq8v+vSSG/EbZQY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)