UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G/rUv+fvXQVhmqcGsg4f+WviNzGbEKiHaDr2l19vRqQ=' 
WHERE 
  key_id = 'bffd2e29938b11de63dfb9793fcc55a795be66d4d4097527e8973e0a6336ccf3' 
  AND (
    token = 'G/rUv+fvXQVhmqcGsg4f+WviNzGbEKiHaDr2l19vRqQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054