UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6mnPe+JWokcZ/Cmz5v6iuJGyrHZSHBXGiNy4lXUBHKE='
WHERE
key_id = 'dc84b3ef764a9cf858a75bfa2210fa74ba21daaea2d37b1b103955458997a13f'
AND (
token = '6mnPe+JWokcZ/Cmz5v6iuJGyrHZSHBXGiNy4lXUBHKE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)