UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'engFcpRi3djSxkDSo8EvoWmjE4qBUUWg7pM8gfDhkE0='
WHERE
key_id = '848fb9d02ac3b1ec13f7e34c5c21ad9026bf1b5a69a52643bda5b09fb2bd8474'
AND (
token = 'engFcpRi3djSxkDSo8EvoWmjE4qBUUWg7pM8gfDhkE0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)