UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z3Bc21uBReNGWJJKCrrBVeNOmATotQpnBGkb2wxs3GE='
WHERE
key_id = '3a7acde3f0b52b5e569c8357c95dae5134b7e729392fcfe117bd8d766fa70a93'
AND (
token = 'z3Bc21uBReNGWJJKCrrBVeNOmATotQpnBGkb2wxs3GE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)