UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8UrTv+f0DvmXBL43aVlwOw4/Mtc25HDrLMsL7R7+yY4=' 
WHERE 
  key_id = 'c3aba34731c9036f48082b42fa9ab94d4f19b2da2cb71e2246cd7171d6c41d2c' 
  AND (
    token = '8UrTv+f0DvmXBL43aVlwOw4/Mtc25HDrLMsL7R7+yY4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055