UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r/hS9T4JlrK4PwEKlHz/CcKLimqOgBdPZa+dR6rgNvM='
WHERE
key_id = '00853ae9a9363b7e11ee66024df66e8795c0677cc5df698ff1d9be031b6879c1'
AND (
token = 'r/hS9T4JlrK4PwEKlHz/CcKLimqOgBdPZa+dR6rgNvM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)