UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UXx6EfBnffxw1uw9WpJI4hB+9DbNUofg3Yws7YxSUvs=' 
WHERE 
  key_id = '63ba6302a740a5e2ea885d4e3b13ab8999c86a647f43e5b50e29cc3925d34b75' 
  AND (
    token = 'UXx6EfBnffxw1uw9WpJI4hB+9DbNUofg3Yws7YxSUvs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017