UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Z2bUseW2bhDBEWomHILMl2wdXjL+oyOxm8WIhjMEpg8=' 
WHERE 
  key_id = '3c0b4a56b9b5178e42c0e6683cf96d50f22d2f3a5a553b44d4ff55687912f3c4' 
  AND (
    token = 'Z2bUseW2bhDBEWomHILMl2wdXjL+oyOxm8WIhjMEpg8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040