UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UtqfcHkLLLIQTzL3EM5aDQCZd1lgfoDZpJL3E9E/Rl4=' 
WHERE 
  key_id = 'fed710666ae834c3d184cedd8ca5d848ee52f5457b92a1da68594f09457d72c8' 
  AND (
    token = 'UtqfcHkLLLIQTzL3EM5aDQCZd1lgfoDZpJL3E9E/Rl4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016