UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hGob7PaVux80+bmyE/wOTMPhHKJ6R62tK6JkLVpo7GA='
WHERE
key_id = 'e3e8b80c724be351b6024de5ac5a06d85848cd0d45ff64eab654ec99260bd9cb'
AND (
token = 'hGob7PaVux80+bmyE/wOTMPhHKJ6R62tK6JkLVpo7GA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)