UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rb/K+Y540jzs2HKYt6KD+lhXuLVhSGUfrM1OBWcjdbo='
WHERE
key_id = 'ad93f4692acd827e5d6bbfaaac8f23da8da3be3cd52350d359608ea8a71f5f23'
AND (
token = 'Rb/K+Y540jzs2HKYt6KD+lhXuLVhSGUfrM1OBWcjdbo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)