UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VNFR+7XfzVazCN6PT8VdbPfvDoMc3vY+LtzwanW3PA='
WHERE
key_id = 'bffbe76c921658873790a753e68783e3e2c4cae78c3f1a401376ab3068c770c6'
AND (
token = '+VNFR+7XfzVazCN6PT8VdbPfvDoMc3vY+LtzwanW3PA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)