UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1/LTEjIK2yS/aZD05ZHcOSg4/HcSZF2foHEc913ZP4g='
WHERE
key_id = '3b1f5cb396ffc6548ab49b936f6c100b5758cc9324358cba5e66ce7247b1a1c8'
AND (
token = '1/LTEjIK2yS/aZD05ZHcOSg4/HcSZF2foHEc913ZP4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)