UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vzSL+MQtGLyUR/mgodjK8lH3YxbjRmYbJMpFoD07x7Y='
WHERE
key_id = '59ffcbedaad172c2d4cb2521d2a0ba5f3344def38a5e44d717daf75e404340d5'
AND (
token = 'vzSL+MQtGLyUR/mgodjK8lH3YxbjRmYbJMpFoD07x7Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)