UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WSKvkvfPXwuWeVAT0hn3lUG1/XuQakIOpFSOgaL8NDE='
WHERE
key_id = '36b63e8b6950b8e9e51f36f7e502adf770ad7c1f006079c33bdf8180b1f6e068'
AND (
token = 'WSKvkvfPXwuWeVAT0hn3lUG1/XuQakIOpFSOgaL8NDE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)