UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't96Yjt2G+NKb15vU2ubxtX9ewtugyzz9zKSZL79kxDc=' 
WHERE 
  key_id = '14609c60aa77b8bbcd9b25baf0e06bb2bcb78deb9bdfa42f9b95c7e65e16353c' 
  AND (
    token = 't96Yjt2G+NKb15vU2ubxtX9ewtugyzz9zKSZL79kxDc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034