UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HP6OPzCCfm8eNuzGZYnTxj8ag8owKVcKxN9i6WqPJA0=' 
WHERE 
  key_id = '26cc4c51aa935fd1be67c4cbc56eb3ce66082b67609ae5b33d91e5ab56ac61eb' 
  AND (
    token = 'HP6OPzCCfm8eNuzGZYnTxj8ag8owKVcKxN9i6WqPJA0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00074