UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VNEP1sQZVsZDm+NbCTCpYcHUJcu/PNEH3C3uTzW3Vkg='
WHERE
key_id = '849000eaaaf0cfcec977c2eb3eabe24ecc8e3e758a923b2592d7a634ba15d976'
AND (
token = 'VNEP1sQZVsZDm+NbCTCpYcHUJcu/PNEH3C3uTzW3Vkg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)