UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LnUPZqVTynNOpJ0QAqgZIxilZ9yH0q8Mq/s4w0t37SQ='
WHERE
key_id = '82ff0aff4bcd4efed7de5ac714682c156475b3179fbf52a729659ed19a39042a'
AND (
token = 'LnUPZqVTynNOpJ0QAqgZIxilZ9yH0q8Mq/s4w0t37SQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)