UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '90YZMM6JGbY5IT8JX5htw9h7yDlzEdemzL4fKLOI1qw=' 
WHERE 
  key_id = 'fb2bfc3ff6f2608c6475c1eba4b7979e9406b8ef94e4356a090719fcccddf8ae' 
  AND (
    token = '90YZMM6JGbY5IT8JX5htw9h7yDlzEdemzL4fKLOI1qw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027