UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cVc+nLLEHaDGOqZagLuoRqPThdN7RsgYfoNwU4eqH0s='
WHERE
key_id = '7eb98df8d3eaa0aa343320cc3841243f72e84d203e711a4cd1f3463feeff3741'
AND (
token = 'cVc+nLLEHaDGOqZagLuoRqPThdN7RsgYfoNwU4eqH0s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)