UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iOxCQ6tBKcr4t4GLl67i5et+fQJo5kdsVTTBqO691DI=' 
WHERE 
  key_id = 'ef7026061312a2549b9265f8660a508c850a1f452c722dbe00eb95169c1eafe1' 
  AND (
    token = 'iOxCQ6tBKcr4t4GLl67i5et+fQJo5kdsVTTBqO691DI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019