UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/7m9wr6zLxMFF2yYcjYxjkGOD3HnlPMr1dzVS3zquJQ='
WHERE
key_id = '6097cda5d71b33e976325b30f354bf928978e4a4b8ebfffc640b6581dbc17845'
AND (
token = '/7m9wr6zLxMFF2yYcjYxjkGOD3HnlPMr1dzVS3zquJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)