UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3L3MgUnSqtqFEBbvL38wzhn2Z11pVkuzViNa+4HpJbQ=' 
WHERE 
  key_id = 'e325202d74d8cd63c8a7c6918e58d527a73e33afe39ebe26c534bd28d95d3d3a' 
  AND (
    token = '3L3MgUnSqtqFEBbvL38wzhn2Z11pVkuzViNa+4HpJbQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035