UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/NkYnZneutwsxVJPuGV/ul07UEi0EY9EoVwBXcZz9RY=' 
WHERE 
  key_id = '537252ba0aa57fef4bff960e8271dd5f78ee6a910ce91f9d2a15e33ee7c11d06' 
  AND (
    token = '/NkYnZneutwsxVJPuGV/ul07UEi0EY9EoVwBXcZz9RY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029