UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ho0AGXd8JK9vCG59nTy5J89M7tlOGcG6u9hgWLMNEdI=' 
WHERE 
  key_id = '98b3fc2d431cf49da2dc64549ef9e45e6fed8c867b6866edcb90da0764e2682a' 
  AND (
    token = 'ho0AGXd8JK9vCG59nTy5J89M7tlOGcG6u9hgWLMNEdI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046