UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LPdCBMSoAeaehh+SDVrhwzjth/IEvEcszrWrHQm2EeE='
WHERE
key_id = '6ca351b7a19b18fbffa72692748abed27994d4012c6581abb9811be00e81eaec'
AND (
token = 'LPdCBMSoAeaehh+SDVrhwzjth/IEvEcszrWrHQm2EeE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)