UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5VtgL1+J4c3x5Ir6jKMYIUi9oLM+OlMI06uh/uN3oNE='
WHERE
key_id = '67251c86cf525b20387f6a32e10caa2b1678aabe63381413eca062bd69153cbd'
AND (
token = '5VtgL1+J4c3x5Ir6jKMYIUi9oLM+OlMI06uh/uN3oNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)