UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JOXHqvTTcvt5GOzP3Vy4HcSS4hwjnPwzL7GFnQp/BYU='
WHERE
key_id = '3be69a4e8424dc07117271862a686791b374ad87ffb0633359d91b06db9b4d3b'
AND (
token = 'JOXHqvTTcvt5GOzP3Vy4HcSS4hwjnPwzL7GFnQp/BYU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)